//app.vue添加
<template><router-view v-if="isRouterAlive"></router-view></template>

<script setup lang="ts">
import { nextTick, provide, ref } from "vue";
const isRouterAlive = ref(true);
const reload = () => {
  isRouterAlive.value = false;
  nextTick(() => {
    isRouterAlive.value = true;
  });
};
provide("reload", reload);
</script>


// 解决操作后刷新页面白屏
//页面添加
const reload = inject("reload");

